﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Deck.aspx.cs" Inherits="PlanningPoker.Deck" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
	<link type="text/css" rel="Stylesheet" href="common.css" />
	<style type="text/css">
		#wrap
		{
		    width:100%;
		    padding:0;
		}
		li
		{
		    list-style:none;
		    float:left;
		}
		ul
		{
		    clear:both;
		    margin:0;
		    padding:0;
		}
		form,br
		{
		    clear:both;
		}
	</style>
	<script type="text/javascript">
		function post(card) {
			document.toTable.card.value = card;
			document.toTable.submit();
		}
		function setOnClick(button) {
			button.onclick = function () {
				post(button.value);
			};
		}
		window.onload = function () {
			var inputs = cards.getElementsByTagName("input");
			for (var i = 0; i < inputs.length; ++i) {
				setOnClick(inputs[i]);
			}
		}
	</script>
</head>
<body>
	<div id="wrap">
		<ul id="players">
<%	var players = PlanningPoker.Game.Players; %>
			<li class="player">총 <%= players.Count %>명</li>
<%	foreach (var player in players)
	{
%>			<li class="player"><%= player%></li>
<%	}
%>		</ul>
		<form action="Play.aspx" method="post" id="toTable" name="toTable">
			<input type="hidden" name="card" />
		</form>
		<ul id="cards">
			<li class="card"><input type="button" value="0" /></li>
			<li class="card"><input type="button" value="0.5" /></li>
			<li class="card"><input type="button" value="1" /></li>
			<li class="card"><input type="button" value="2" /></li>
			<li class="card"><input type="button" value="3" /></li>
			<li class="card"><input type="button" value="5" /></li>
			<li class="card"><input type="button" value="8" /></li>
			<br />
			<li class="card"><input type="button" value="13" /></li>
			<li class="card"><input type="button" value="20" /></li>
			<li class="card"><input type="button" value="40" /></li>
			<li class="card"><input type="button" value="100" /></li>
			<li class="card"><input type="button" value="?" /></li>
			<li class="card"><input type="button" value="tea" /></li>
		</ul>
		<form action="Leave.aspx" method="post">
			<input type="submit" value="나가기" />
		</form>
	</div>
</body>
</html>
